using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Product: BusinessObjectBase
	{

		#region InnerClass
		public enum ProductFields
		{
			ProductID,
			ProductName,
			Operaton,
			Cpu,
			Memory,
			Display,
			Camera,
			Batterry,
			Price,
			Warranty,
			Deleted
		}
		#endregion

		#region Data Members

			int _productID;
			string _productName;
			string _operaton;
			string _cpu;
			string _memory;
			string _display;
			string _camera;
			string _batterry;
			string _price;
			string _warranty;
			bool? _deleted;

		#endregion

		#region Properties

		public int  ProductID
		{
			 get { return _productID; }
			 set
			 {
				 if (_productID != value)
				 {
					_productID = value;
					 PropertyHasChanged("ProductID");
				 }
			 }
		}

		public string  ProductName
		{
			 get { return _productName; }
			 set
			 {
				 if (_productName != value)
				 {
					_productName = value;
					 PropertyHasChanged("ProductName");
				 }
			 }
		}

		public string  Operaton
		{
			 get { return _operaton; }
			 set
			 {
				 if (_operaton != value)
				 {
					_operaton = value;
					 PropertyHasChanged("Operaton");
				 }
			 }
		}

		public string  Cpu
		{
			 get { return _cpu; }
			 set
			 {
				 if (_cpu != value)
				 {
					_cpu = value;
					 PropertyHasChanged("Cpu");
				 }
			 }
		}

		public string  Memory
		{
			 get { return _memory; }
			 set
			 {
				 if (_memory != value)
				 {
					_memory = value;
					 PropertyHasChanged("Memory");
				 }
			 }
		}

		public string  Display
		{
			 get { return _display; }
			 set
			 {
				 if (_display != value)
				 {
					_display = value;
					 PropertyHasChanged("Display");
				 }
			 }
		}

		public string  Camera
		{
			 get { return _camera; }
			 set
			 {
				 if (_camera != value)
				 {
					_camera = value;
					 PropertyHasChanged("Camera");
				 }
			 }
		}

		public string  Batterry
		{
			 get { return _batterry; }
			 set
			 {
				 if (_batterry != value)
				 {
					_batterry = value;
					 PropertyHasChanged("Batterry");
				 }
			 }
		}

		public string  Price
		{
			 get { return _price; }
			 set
			 {
				 if (_price != value)
				 {
					_price = value;
					 PropertyHasChanged("Price");
				 }
			 }
		}

		public string  Warranty
		{
			 get { return _warranty; }
			 set
			 {
				 if (_warranty != value)
				 {
					_warranty = value;
					 PropertyHasChanged("Warranty");
				 }
			 }
		}

		public bool?  Deleted
		{
			 get { return _deleted; }
			 set
			 {
				 if (_deleted != value)
				 {
					_deleted = value;
					 PropertyHasChanged("Deleted");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("ProductID", "ProductID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("ProductName", "ProductName",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Operaton", "Operaton",100));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Cpu", "Cpu",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Memory", "Memory",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Display", "Display",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Camera", "Camera",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Batterry", "Batterry",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Price", "Price",1000));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Warranty", "Warranty",100));
		}

		#endregion

	}
}
